 <?php
require_once ('PEAR/PackageFileManager.php');

$packagexml = new PEAR_PackageFileManager;
$e = $packagexml->setOptions(array (
    'package' => 'HTML_Template_Smarty',
    'summary' => 'neat stuff',
    'description' => 'wow',
	'baseinstalldir' => 'HTML/Template/Smarty',
	'version' => '2.6.14',
	'packagedirectory' => './Smarty-2.6.14/libs',
	'state' => 'stable',
		'filelistgenerator' => 'file', // generate from cvs, use file for directory
	'notes' => 'This is simply a packaged version of Smarty. It does not confirm to PEAR, but whatever.',
	'ignore' => array (

		), // ignore TODO, all files in tests/
	'installexceptions' => array (
		), // baseinstalldir ="/" for phpdoc
	'dir_roles' => array (
	),
	'exceptions' => array (
	)
)); // same for the license
if (PEAR :: isError($e)) {
	echo $e->getMessage();
	die();
}
/*
$e = $test->addPlatformException('pear-phpdoc.bat', 'windows');
if (PEAR :: isError($e)) {
	echo $e->getMessage();
	exit;
}
*/
/*
$packagexml->addRole('pkg', 'doc'); // add a new role mapping
if (PEAR :: isError($e)) {
	echo $e->getMessage();
	exit;
}
*/
/*
// replace @PHP-BIN@ in this file with the path to php executable!  pretty neat
$e = $test->addReplacement('pear-phpdoc', 'pear-config', '@PHP-BIN@', 'php_bin');
if (PEAR :: isError($e)) {
	echo $e->getMessage();
	exit;
}
*/
/*
$e = $test->addReplacement('pear-phpdoc.bat', 'pear-config', '@PHP-BIN@', 'php_bin');
if (PEAR :: isError($e)) {
	echo $e->getMessage();
	exit;
}
*/
// note use of debugPackageFile() - this is VERY important
if (isset ($_GET['make']) || $_SERVER['argv'][1] == 'make') {
	$e = $packagexml->writePackageFile();
} else {
	$e = $packagexml->debugPackageFile();
}
if (PEAR :: isError($e)) {
	echo $e->getMessage();
	die();
}
?>